import ajax from './ajax'
import upFile from './upfile'
import { config } from 'shelljs'

export const reqCity = () => ajax('http://localhost:8081/api/cityList')

const baseUrl = 'http://localhost:4000'
//发送mock数据请求
export const reqInfo = () => ajax('/info')
export const reqGoods = () => ajax('/goods')
export const reqRatings = () => ajax('/ratings')

//上传文件
// export const uploadFile = (data) => upFile('/upload/img', data)

export const uploadFile = (data) => ajax('/api/upload/img', data, 'POST')

//注册api
export const reqRegister = (data) => ajax('/api/register', data, 'POST')
export const reqLogin = (data) => ajax('/api/login', data, 'POST')
//获取用户信息
export const reqUsers = (data) => ajax('/api/users', data, 'GET')
//获取用户列表
export const reqUserList = (data) => ajax('/api/users/userlist', data, 'GET')
//发送消息
export const reqSendMsg = (data) => ajax('/api/users/userlist', data, 'POST')
export const reqTest = (data) => ajax('/common/testdemo', data, 'GET')




